package com.yunjinsuke.recharge.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.Id;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;


/**
 * 商户
 */
@Entity
@DynamicUpdate
@Table(name = "merchant", indexes = {
        @Index(columnList = "appId")
})
@org.hibernate.annotations.Table(appliesTo = "merchant", comment = "商户信息")
@Data
@EqualsAndHashCode(callSuper = true)

public class Merchant extends BaseEntity {

    /**
     * appID
     */
    @Column(nullable = false, columnDefinition = "varchar(24) comment 'appID'")
    private String appId;

    /**
     * 商户密钥
     */
    @Column(nullable = false, columnDefinition = "varchar(50) comment '商户密钥'")
    private String mchKey;

}
